package com.bootdo.system.dao;

import com.bootdo.system.domain.ProductInnerDO;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 项目产品中间表
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2020-06-24 19:11:08
 */
@Mapper
public interface ProductInnerDao {

	ProductInnerDO get(Integer id);
	
	List<ProductInnerDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(ProductInnerDO productInner);
	
	int update(ProductInnerDO productInner);
	
	int remove(Integer id);
	
	int batchRemove(Integer[] ids);

    ProductInnerDO checkAlive(@Param("projectId") Integer projectId,@Param("productId") Integer productId,@Param("sonsysId") Integer sonsysId);

    List<ProductInnerDO> projectAllMoney(Integer projectId);

    List<ProductInnerDO> listall(Integer projectId);

    List<ProductInnerDO> getProDuctBysonsysId(Integer sonsysId);

	List<ProductInnerDO> calculateSonsys(@Param("projectId") Integer projectId, @Param("sonsysId")Integer sonsysId);

    List<Integer> getSonsysListByProjectId(Integer projectId);

    void updateAllProductWithProjectId(ProductInnerDO productInner);
}
